<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>iPhone Style Radios Demo</title>
  <script src="prototype/prototype-1.6.0.3.js" type="text/javascript" charset="utf-8"></script>
  <script src="prototype/scriptaculous-effects-1.8.2.js" type="text/javascript" charset="utf-8"></script>
  <script src="prototype/iphone-style-checkboxes.js" type="text/javascript" charset="utf-8"></script>
  <link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" />
  <style type="text/css">
    body {
      padding: 10px;
    }
    label.left {
      float: left;
      padding: 4px;
      padding-right: 15px;
    }
    .css_sized_container .iPhoneCheckContainer {
      width: 250px;
    }
    ol {
      list-style-type: none;
      margin: 0;
      padding: 0;
    }
    ol li {
      padding: 10px;
      margin: 0;
    }
    .onchange input {
      opacity: 1 !important;
      left: 100px;
    }
    .onchange .iPhoneCheckContainer {
      overflow: visible;
    }
  </style>

  <script type="text/javascript" charset="utf-8">
    document.observe("dom:loaded", function() {
      new iPhoneStyle('.on_off input[type=checkbox]');
      new iPhoneStyle('.css_sized_container input[type=checkbox]', { resizeContainer: false, resizeHandle: false });
      new iPhoneStyle('.long_tiny input[type=checkbox]', { checkedLabel: 'Very Long Text', uncheckedLabel: 'Tiny' });
      
      var onchange_checkbox = $$('.onchange input[type=checkbox]').first();
      new iPhoneStyle(onchange_checkbox);
      setInterval(function toggleCheckbox() {
        onchange_checkbox.writeAttribute('checked', !onchange_checkbox.checked);
        onchange_checkbox.change();
        $('status').update(onchange_checkbox.checked);
      }, 2500);
    });
  </script>
  
</head>
<body>
  <ol class="on_off">
    <li>
      <label class="left" for="on_off">Default</label>
      <input type="checkbox" id="on_off" />
    </li>
  
    <li>
      <label class="left" for="on_off_on">Default On</label>
      <input type="checkbox" checked="checked" id="on_off_on"/>
    </li>
  </ol>

  <ol class="css_sized_container">
    <li>
      <label class="left" for="css_sized_container">CSS Sized Container and Handle</label>
      <input type="checkbox" id="css_sized_container"/>
    </li>
  </ol>

  <ol class="long_tiny">
    <li>
      <label class="left" for="long_tiny">Long and short labels</label>
      <input type="checkbox" id="long_tiny"/>
    </li>
  </ol>

  <ol class="onchange">
    <li>
      <input type="checkbox" id="onchange"/>
      <br />
      <p>Checkbox status is <strong><span id="status">...</span></strong>.</p>
    </li>
  </ol>
</body>
</html>